require File.dirname(__FILE__) + "/data_utils"
#require 'yaml'

#file = YAML.load_file(__FILE__ + "/../_tmp/german_cities.yml")

#file.each_key do |key|
   # puts key
    #DataUtils::Geo::Locator.add_location(:city => key, :region => file[key], :country => 'Germany')
    #DataUtils::Processing::Aliases.add_country(key, file[key])
    #DataUtils::Processing::Aliases.add_region(key, file[key])
#end

loc = DataUtils::Geo::Locator.new()
loc.add_processor(DataUtils::Processing::Aliases)

#DataUtils::Processing::Aliases.add_city("NYC", "New York City")
#DataUtils::Processing::Aliases.add_city("N.Y.C.", "New York City")
#DataUtils::Processing::Aliases.add_city("Manhattan", "New York City")

puts loc.city_search({:city => 'franklin',:region => 'MASSACHUSETTS'}, {:train => true})
#puts loc.city_search({:city => "franklin", :country => 'us'})
#puts loc.search(:city => "boston")
#DataUtils::Geo::City.find().each do |city|
#	DataUtils::Geo::Locator.add_search_term({:city => city.name}, city)
#end
#DataUtils::Processing::Aliases.add_city("New York", "New York City")

